<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the deleteNoteInDB method from the NotesDatabaseService class, for the Dart programming language.">
  <title>deleteNoteInDB method - NotesDatabaseService class - data library - Dart API</title>

  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="../../static-assets/github.css">
  <link rel="stylesheet" href="../../static-assets/styles.css">
  <link rel="icon" href="../../static-assets/favicon.png">

</head>

<body data-base-href="../../"
      data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../../index.html">trpp</a></li>
    <li><a href="../../data_data/data_data-library.html">data</a></li>
    <li><a href="../../data_data/NotesDatabaseService-class.html">NotesDatabaseService</a></li>
    <li class="self-crumb">deleteNoteInDB method</li>
  </ol>
  <div class="self-name">deleteNoteInDB</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
      <form class="search-sidebar" role="search">
        <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
      </form>
    </header>
    
    <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
      <li><a href="../../index.html">trpp</a></li>
      <li><a href="../../data_data/data_data-library.html">data</a></li>
      <li><a href="../../data_data/NotesDatabaseService-class.html">NotesDatabaseService</a></li>
      <li class="self-crumb">deleteNoteInDB method</li>
    </ol>
    
    <h5>NotesDatabaseService class</h5>
    <ol>



    <li class="section-title">
      <a href="../../data_data/NotesDatabaseService-class.html#instance-properties">Properties</a>
    </li>
    <li><a href="../../data_data/NotesDatabaseService/database.html">database</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></li>
    <li><a href="../../data_data/NotesDatabaseService/path.html">path</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>

    <li class="section-title"><a href="../../data_data/NotesDatabaseService-class.html#instance-methods">Methods</a></li>
    <li><a href="../../data_data/NotesDatabaseService/addNoteInDB.html">addNoteInDB</a></li>
    <li><a href="../../data_data/NotesDatabaseService/addNotificationInDB.html">addNotificationInDB</a></li>
    <li><a href="../../data_data/NotesDatabaseService/deleteNoteInDB.html">deleteNoteInDB</a></li>
    <li><a href="../../data_data/NotesDatabaseService/deleteNotificationInDB.html">deleteNotificationInDB</a></li>
    <li><a href="../../data_data/NotesDatabaseService/getNotesFromDB.html">getNotesFromDB</a></li>
    <li><a href="../../data_data/NotesDatabaseService/getNotificationForNote.html">getNotificationForNote</a></li>
    <li><a href="../../data_data/NotesDatabaseService/getNotificationsFromDB.html">getNotificationsFromDB</a></li>
    <li><a href="../../data_data/NotesDatabaseService/init.html">init</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></li>
    <li><a href="../../data_data/NotesDatabaseService/updateNoteInDB.html">updateNoteInDB</a></li>
    <li><a href="../../data_data/NotesDatabaseService/updateNotificationInDB.html">updateNotificationInDB</a></li>

    <li class="section-title inherited"><a href="../../data_data/NotesDatabaseService-class.html#operators">Operators</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></li>


    <li class="section-title"><a href="../../data_data/NotesDatabaseService-class.html#static-properties">Static properties</a></li>
    <li><a href="../../data_data/NotesDatabaseService/db.html">db</a></li>


</ol>

  </div><!--/.sidebar-offcanvas-->

  <div id="dartdoc-main-content" class="main-content">
      <div><h1><span class="kind-method">deleteNoteInDB</span> method </h1></div>

    <section class="multi-line-signature">
      <span class="returntype"><a href="https://api.flutter.dev/flutter/dart-async/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>&gt;</span></span>
            <span class="name ">deleteNoteInDB</span>
(<wbr><ol class="parameter-list"><li><span class="parameter" id="deleteNoteInDB-param-noteToDelete"><span class="type-annotation"><a href="../../data_data/NotesModel-class.html">NotesModel</a></span> <span class="parameter-name">noteToDelete</span></span></li>
</ol>)
      
    </section>
    <section class="desc markdown">
      <p>Deletes note from database</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">Future&lt;bool&gt; deleteNoteInDB(NotesModel noteToDelete) async {
  final db = await database;
  final res = await db
      .delete(&#39;Notes&#39;, where: &#39;_id = ?&#39;, whereArgs: [noteToDelete.id]);
  print(&#39;Note deleted&#39;);
  return true;
}</code></pre>
    </section>

  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    trpp
      2.0.0+2
  </span>

</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="../../static-assets/typeahead.bundle.min.js"></script>
<script src="../../static-assets/highlight.pack.js"></script>
<script src="../../static-assets/script.js"></script>


</body>

</html>
